import docutils.core as duc
infile = 'resume_web.txt'
source_path='.'
destination_path='.'
input_string=open(infile,'r').read()

parts = duc.publish_parts(
    source=input_string, source_path=source_path,
    destination_path=destination_path,
    writer_name='latex')

d = duc.publish_doctree(
    source=input_string, source_path=source_path)

from docutils.parsers import rst
from docutils.parsers.rst import Parser
from docutils.frontend import OptionParser
from docutils.utils import new_document
settings = OptionParser(components=(Parser,)).get_default_values()
settings.debug = 0
document = new_document(infile, settings)
parser = Parser()
parser.parse(input_string, document)




